package tech.aistar.corejava.day06.day06work.Test02;

/**
 * Created by 豆梦寒 on 2019/7/22.
 */
public class DataTransfer {
    public  static void main(String[] args){

        DataTransfer dt = new DataTransfer();
        int a = 10;
        int b = 20;
        dt.fun1(a,b);
        System.out.println("a = " + a + ", b = " + b);

        Book book = new Book("四大名著全套",199.9f);
        dt.fun2(book);
        System.out.println("书的名称："+ book.getBookName() +
                ", 书的价格：" + book.getBookPrice());
    }


    public void fun1(int a, int b){
        a = 30;
        b = 40;
    }

    public void fun2(Book book){
        book.setBookName("毛泽东选集");
        book.setBookPrice(99.9f);
    }
}
